package com.cloud.wms.ui.inside.entity;

import android.os.Parcel;

import com.cloud.wms.ui.main.entity.BatchEntity;

/**
 * @Author:Chen
 * @Date: 2021-01-26 10:38
 * @Description:
 */
public class RevertBatchEntity extends BatchEntity {
    private boolean isSelect;
    private int amount;
    private long posID;

    public long getPosID() {
        return posID;
    }

    public void setPosID(long posID) {
        this.posID = posID;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    public RevertBatchEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeByte(this.isSelect ? (byte) 1 : (byte) 0);
        dest.writeInt(this.amount);
        dest.writeLong(this.posID);
    }

    protected RevertBatchEntity(Parcel in) {
        super(in);
        this.isSelect = in.readByte() != 0;
        this.amount = in.readInt();
        this.posID = in.readLong();
    }

    public static final Creator<RevertBatchEntity> CREATOR = new Creator<RevertBatchEntity>() {
        @Override
        public RevertBatchEntity createFromParcel(Parcel source) {
            return new RevertBatchEntity(source);
        }

        @Override
        public RevertBatchEntity[] newArray(int size) {
            return new RevertBatchEntity[size];
        }
    };
}
